📱 Web-app
Goal of this document is to kickstart your development of the web-app as an engineer
Environment prerequisites
💡 You will need Linux or Mac OSX with Docker to develop Web-app services
To develop Entrance Observer video processing services you’ll need Jetson Orin Nano or Jetson Nano to have GPU support and docker image compatibility
Architecture
Core services
The following services are mandatory, you will need to git-checkout them and start in the following order:
- mysql ← provides storage for other node and go services
- redis ← provides a pub-sub and caching layer
- graphql-schema-registry ← stores graphql schema of microservices
- graphql-router ← routes API requests to other microservices using a graphql federation, which basically means that requests are split and routed to the microservice that is responsible for particular part of the schema
Core services and routing
Product services
- go-api ← main service that manages domain entities like apiary, hive, hive section, frame, frame side
- image-splitter ← main service that manages image processing + stores data on the detected objects in the frame photo
Note that some service may still be in development and can be unstable or only in draft phase (video processing for example)
Development setup
Start by checking out https://github.com/gratheon/web-app. Its just a react single-page app and does not need a docker image but you can see API dependencies it will require. Running pure just start
will allow you to use production backend for frontend development, so you should be able to login with existing credentials. This is most useful in case you need to make cosmetic or FE-only changes that do not alter or introduce any API schema modification.
To have full flexibility of schema and backend modification, you will need to checkout all of the core dependent services based on the architecture diagram and understand how services on the backend are connected
After checkout, for every service
- You’ll need to run
just start
to start docker container - Set
src/config/config.dev.ts
that was not commited to the repository. Configs typically include credentials to access DB, AWS S3 or external services
💡 Note that some services run DB migrations when they start-up, so make sure you have mysql running and databases pre-created with valid user access. Note that most services do not yet re-connect to mysql automatically, so you need to start services in correct order or restart pod
Optional services
Some services are not blocking the UI or backend in general, but are required for some specific features, so you may need depending on your work:
- models-bee-detector ← detects bees
- event-stream-filter ← sends events to frontend
- gate-video-stream
- models-gate-tracker